package rbac

import (
	"mldong/api/base"
	menuApi "mldong/api/menu"
	userApi "mldong/api/user"

	"github.com/gogf/gf/v2/frame/g"
)

type SaveRoleMenuReq struct {
	g.Meta `path:"/sys/rbac/saveRoleMenu" tags:"RBAC管理" method:"post" summary:"保存角色菜单关联" description:"入参为数组对象"`
	RoleMenuParam
}
type RoleMenuIdsReq struct {
	g.Meta `path:"/sys/rbac/roleMenuIds" tags:"RBAC管理" method:"post" summary:"获取角色菜单关联ID" perm:"sys:rbac:roleMenuIds,sys:rbac:saveRoleMenu" mode:"or"`
	RoleId string `json:"roleId" dc:"角色ID" v:"required#请输入角色ID"`
}
type RoleMenuIdsRes struct {
	base.CommonResult
	Data []string `json:"data" dc:"角色菜单关联ID"`
}
type RoleMenuListReq struct {
	g.Meta `path:"/sys/rbac/roleMenuList" tags:"RBAC管理" method:"post" summary:"获取角色菜单关联列表"`
	RoleId string `json:"roleId" dc:"角色ID" v:"required#请输入角色ID"`
}

type RoleMenuListRes struct {
	base.CommonResult
	Data []menuApi.MenuVO `json:"data" dc:"角色关联菜单列表"`
}
type SaveUserRoleReq struct {
	g.Meta `path:"/sys/rbac/saveUserRole" tags:"RBAC管理" method:"post" summary:"添加用户角色关系" description:"入参为数组对象"`
	UserRoleParam
}
type RemoveUserRoleReq struct {
	g.Meta `path:"/sys/rbac/removeUserRole" tags:"RBAC管理" method:"post" summary:"删除用户角色关系" description:"入参为数组对象"`
	UserRoleParam
}
type UserListByRoleIdReq struct {
	g.Meta `path:"/sys/rbac/userListByRoleId" tags:"RBAC管理" method:"post" summary:"通过角色ID获取用户列表"`
	userApi.PageReq
	RoleId string `json:"roleId" dc:"角色ID" v:"required#请输入角色ID"`
}
type UserListExcludeRoleIdReq struct {
	g.Meta `path:"/sys/rbac/userListExcludeRoleId" tags:"RBAC管理" method:"post" summary:"获取用户列表-排除指定角色"`
	userApi.PageReq
	RoleId string `json:"roleId" dc:"角色ID" v:"required#请输入角色ID"`
}
